package com.hxzy.controller.front;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hxzy.common.core.domain.R;
import com.hxzy.common.core.domain.entity.PzServiceItem;
import com.hxzy.common.vo.PageVO;

import com.hxzy.system.domain.dto.PzServiceItemDTO;
import com.hxzy.system.service.PzServiceItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 中介服务
 *
 * @Author： 17602
 * @Date： 2022/9/18 22:25
 * @Desc：中介服务
 **/
@Api(tags = "前台：中介服务")
@RestController
@RequestMapping("/front/pz-services")
public class FrontPzServiceItemController {
    
    @Autowired
    private PzServiceItemService pzServiceItemService;
    
    @ApiOperation("为前台提供列表")
    @PostMapping("/list")
    public R getList(@RequestBody PzServiceItemDTO pzServiceItemDTO) {
        
        IPage<PzServiceItem> search = this.pzServiceItemService.searchOfFront(pzServiceItemDTO);
        PageVO<PzServiceItem> pageVo = PageVO.pageVo(search);
        
        return R.okHasData(pageVo);
    }
}
